<template>
	<view class="announcementDetail">
		<view class="header">
			
		</view>
		<view class="title">
			{{title}}
		</view>
		<image class="announcement-item-img" :src="imgSrc"></image>
		<view class="content">
			{{content}}
		</view>
		<view class="footer">
			<image class="footerimg" src="https://wlsy.nanjingyunpeng.cn/weixin/image/footerImg.png"></image>
		</view>
	</view>
</template>

<script>
	import {
		noticesdetail,
	} from "../../api/api.js"
	export default {
		data() {
			return {
				title: "",
				imgSrc: "",
				content: ""
			}
		},
		onLoad: function(option) {
			// console.log("iiiiiid", option.id);
			this.noticesdetail(option.id)
		},
		methods: {
			async noticesdetail(val) {
				let res = await noticesdetail({
					id: val
				})
				// console.log("公告详情", res)
				this.title = res.data.title
				this.imgSrc = res.data.image
				this.content = (res.data.content.substring(3)).substring(0,res.data.content.length-7)
			}
		}
	}
</script>

<style scoped lang="scss">
	.announcementDetail {
		min-width: 100%;
		min-height: 100%;
		background-color: #EEF7FE;
		padding: 50rpx;
		padding-top: 70rpx;
		box-sizing: border-box;
		.header{
			width: 750rpx;
			height: 40rpx;
			background:#466EE7 ;
			border-radius: 0rpx 0rpx 60rpx 60rpx;
			position: fixed;
			top: 0;
			left: 0;
		}

		.announcement-item-img {
			width: 660rpx;
			height: 360rpx;
			margin: 20rpx 0;
		}
		.footer {
			width: 750rpx;
			height: 324rpx;
			position: fixed;
			bottom: 0;
			left: 0;
		
			.footerimg {
				width: 100%;
				height: 100%;
			}
		}
	}
</style>
